cmake_minimum_required(VERSION 2.8)

project(HTS_driver)


set(MY_DIR "/home/amit/IBM/work/myLib")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -DFLITE_PLUS_HTS_ENGINE=1 " )

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${MY_DIR})

set( LIBRARY_DEPS Amit_HTS_ENGINE)

#find_package(Amit_HTS_ENGINE NAMES Amit_HTS_ENGINE PATH ${CMAKE_CURRENT_SOURCE_DIR})

#test for ANDROID and look for stuff not relevant to android.
if(NOT ANDROID)
#jni is available by default on android
find_package(JNI REQUIRED)
include_directories(${JNI_INCLUDE_DIRS})
endif()

set( LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib/pc CACHE PATH
        "Single Directory for all Libraries")

add_library(AMIT_DRIVER SHARED flite_driver.c )

#link the module like any other
target_link_libraries(AMIT_DRIVER ${CMAKE_SOURCE_DIR}/libAndroid_Amit_HTS_ENGINE.a -lm )

